
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <jsp:include page="headers.jsp" />

        <script type="text/javascript">
            function redirectMe (sel) {
                var url = sel[sel.selectedIndex].value;
                window.location = url;
            }

        </script>
    </head>
    <body>
        <div id="main_container">
            <jsp:include page="loginheader.jsp"/> <!-- end header -->
            <div class="main_content">
                <jsp:include page="${sessionScope.menuChoice}" /> <!-- include home menu -->
                <div class="center_content">
                    <div class="left_content">
                        <div class="sidebar_box">
                            <div class="sidebar_box_top"></div>
                            <div class="sidebar_box_content">
                                <h3>Aircraft List</h3>
                                <p>
                                    <div id="planeList">
                                        <form action="AircraftRentalHistoryDetail" method="POST">

                                            <c:forEach var="plane" items="${planes}">

                                                <input type="radio" name="planeID" value="${plane.id}">${plane.model} ${plane.manufacturer}</input><br/>
                                            </c:forEach>
                                            <br/>
                                            <br/>
                                            <br/>


                                            Start Date<input type="text" id="sdate" name="startDate"
                                                             onmousedown="getStartDate(); "></input><br/>

                                            End Date<input type="text" id="edate" name="endDate" onmousedown="getEndDate(); "></input><br/>

                                            <label style="color: red">${message}</label><br/>
                                            <input type="submit" value="Submit" onClick="redirectMe(this)"></input>
                                            <br/><br/>
                                            <input type="button" value="Print Report" onClick="window.print()"></input>
                                        </form>


                                    </div>
                                </p>
                            </div>
                            <div class="sidebar_box_bottom"></div>
                        </div>
                    </div> <!-- end left content -->
                    <div class="right_content">
                        <div id="planeform">
                            <center><strong>Aircraft History Detail</strong></center>
                            <table class="tablesorter" id="myTable2" border="0">
                                <tr> <th>Reservation Id</th> <th>Reservation Type</th> <th>Aircraft Type</th> <th>Renter's name</th><th>Pilot name</th><th>Start Date</th><th>End Date</th><th>Total Time</th><th>Fuel</th><th>Charges</th>
                                </tr>
                                <c:forEach var="reservation" items="${reservations}">
                                    <tr><td>${reservation[0]}</td>
                                        <td>${reservation[1]}</td>
                                        <td>${reservation[2]}</td>
                                        <td>${reservation[3]}</td>
                                        <td>${reservation[4]}</td>
                                        <td>${reservation[5]}</td>
                                        <td>${reservation[6]}</td>
                                        <td>${reservation[7]}</td>
                                        <td>${reservation[8]}</td>
                                        <td>${reservation[9]}</td>
                                        



                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                        <br></br><br></br>
                    </div><!-- end of right content-->
                </div>   <!--end of center content -->
                <div class="clear"></div>
            </div> <!--end of main content-->
            <div class="footer">
                <div class="left_footer"><a href="http://apycom.com/"></a>Red Team &copy;</div>
                <div class="right_footer"></div>
            </div> <!-- end footer -->
        </div> <!-- end main container -->
    </body>
</html>